package top.wfzzq.ds.sort;

import java.io.Serializable;

/**
 * 對象相等演示對象
 * 
 * @author wanghui
 *
 */
public class EqEntity implements Serializable {

	private static final long serialVersionUID = 6586084881696208245L;
	private int eid;
	private String info;

	public EqEntity() {

	}

	public EqEntity(int eid, String info) {
		this.eid = eid;
		this.info = info;
	}

	public int getEid() {
		return eid;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + eid;
		result = prime * result + ((info == null) ? 0 : info.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EqEntity other = (EqEntity) obj;
		if (eid != other.eid)
			return false;
		if (info == null) {
			if (other.info != null)
				return false;
		} else if (!info.equals(other.info))
			return false;
		return true;
	}

	public void setEid(int eid) {
		this.eid = eid;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	@Override
	public String toString() {
		return "EqEntity [eid=" + eid + ", info=" + info + "]";
	}

}
